#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import admininfo_blueprint
from api_1_0.adminInfoResource.adminInfoResource import AdminInfoResource
from api_1_0.adminInfoResource.adminInfoOtherResource import AdminInfoOtherResource

api = Api(admininfo_blueprint)

api.add_resource(AdminInfoResource, '/adminInfo/<AutoID>', '/adminInfo', endpoint='adminInfo')


# joint query
@admininfo_blueprint.route('/adminInfo/query', methods=['GET'], endpoint='adminInfo_query')
def AdminInfo_query():
    return AdminInfoOtherResource.joint_query()

@admininfo_blueprint.route('/adminInfo/login', methods=['POST'], endpoint='adminInfo_login')
def AdminInfo_login():
    return AdminInfoOtherResource.login()

@admininfo_blueprint.route('/adminInfo/getpassageinfo', methods=['GET'], endpoint='adminInfo_getpassageinfo')
def AdminInfo_getpassageinfo():
    return AdminInfoOtherResource.getpassageinfo()